home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Inventor Labs: Technology
/
INVENTORLABS_TECHNOLOGY.BIN
/
pc
/
files
/
shared.cst
/
Interface Mgr Parent.ls
< prev
Wrap
Text File
|
1997-07-24
|
26KB
|
712 lines
--o: Interface Mgr
-- gInterfaceMgrObj
property pRollOverHiliteSprite, pActiveHiliteSprite, pToolWindowSprite, pToolWinHiliteSprite
property pToolHiliteSprite
property pNumOfButtons
property pToolBtnGrpRect, pGlobalBtnGrpRect, pToolBtnWidth, pToolMenuRect
property pToolBtnSegWidth, pGlobalBtnWidth, pGlobalBtnSegWidth
property pToolBtnGrpLeft, pGlobalBtnGrpLeft, pFirstHiliteBtn, pToolBtnRelFirstCast, pGlobalBtnRelFirstCast
property pWhichBtnOver
property pToolObjectList, pGlobalBtnTargetList
property pLabelTxtCast, pDescriptionTxtCast, pInstructionTxtCast
property pActiveTool, pCastList, pAvailableBtnList
property pLabelSprite, pDescriptionSprite, pInstructionSprite
property pLabelLocH, pDescriptionLocH, pInstructionLocH
property pQTVRmovieList, pCurrentQTVR, pFirstInventorBtn, pCurrentInventor, pTitleSprite
property pFirstAnimTool, pFirstToolOn, pFirstTitle, pFirstToolOff, pAnimBtnCount
property pRotateSprite, pToolCount, pSuspendedTool, pFirstGlobalBtnOn, pGlobalBtnOnSprite
property pSpritePlaceMem
property pToolRects, pButtonSnd
property pToolMenus, pToolsActive
property pGalleryVOsnd, pPictSprite
-- objects
property pQTVRobj, pHSobjIndexedLst, pCurrentHStext, pInvenFilenameLst, pInvHsObjLst
property pInitialQTVRcords,pInitialQTVRlst,pInventorIndexLst
property pActive, pActiveFunctionalty, pUnAvailToolStartCast
global gModeManager, gAreaManagerObj
global gWHSobjIndexedLst, gBHSobjIndexedLst, gEHSobjIndexedLst, gGHSobjIndexedLst
global gInventorIndexNum, gJournalObj
global gActorListMgrObj, gSndPath
global gActiveAmbSnd, gActiveInvObj
global gQTVRobj, gActiveFunctionObj, gHelpFrame, gUtilityObj,gAvailbleInv
----------------------------------------------------------------------------ò
on mInit me, CastList, QTpath
set pCastList = CastList
set pSpritePlaceMem = member "Sprite Placeholder"
-- sprite declarations
set QTVRsprite = 2
set pPictSprite = 18
set pRotateSprite = 26
set pGlobalBtnOnSprite = 38
set pActiveHiliteSprite = 39
set pToolWindowSprite = 40
set pToolWinHiliteSprite = 41
set pTitleSprite = 42
set pRollOverHiliteSprite = 43
set pLabelSprite = 44
set pDescriptionSprite = 45
set pInstructionSprite = 46
set pCurrentHStext = 0
set pWhichBtnOver = 1
-- cast declarations
set pFirstHiliteBtn = getaProp(pCastList,#pFirstHiliteBtn)
set pLabelTxtCast = getaProp(pCastList,#pLabelTxtCast)
set pDescriptionTxtCast = getaProp(pCastList,#pDescriptionTxtCast)
set pInstructionTxtCast = getaProp(pCastList,#pInstructionTxtCast)
set pFirstToolOff = getaProp(pCastList,#pFirstToolOff) -- ROTATEoff
set pFirstTitle = getaProp(pCastList,#pFirstTitle)
set pFirstToolOn = getaProp(pCastList,#pFirstToolOn)
set pFirstAnimTool = getaProp(pCastList,#pFirstAnimTool)
set pFirstGlobalBtnOn = getaProp(pCastList,#pFirstGlobalBtnOn)
MoveBar( 5 )
-- constants
set pActorListMgr = gActorListMgrObj
set pNumOfButtons = 5
set pToolBtnRelFirstCast = 1
set pGlobalBtnRelFirstCast = 7
set pFirstInventorBtn = 10
set pAnimBtnCount = 9
set pUnAvailToolStartCast = the number of cast "TIALLRWNA.PIC"
set pActive = FALSE
repeat with btnCounter = 1 to pNumOfButtons
set firstCast = the number of cast pFirstAnimTool + (btnCounter - 1) * pAnimBtnCount
repeat with animCounter = 0 to pAnimBtnCount - 1
set whichCast = firstCast + animCounter
preLoadCast whichCast
end repeat
end repeat
-- init lists
set pAvailableBtnList = [#rotate:0,#operate:0,#zoom:0,#reveal:0,#load:0]
set pToolObjectList = [#rotate:0,#operate:0,#zoom:0,#reveal:0,#load:0]
set pQTVRmovieList = [#Bell:"BQTVR.MOV",#Edison:"EQTVR.MOV",#Watt:"WQTVR.MOV",#Gallery: "GSQTVR.MOV"]
-- birth objects
-- tool buttons
set pToolCount = 5
set firstToolObject = getaProp(pCastList,#firstToolObject) -- get scripts via compiled interger
MoveBar( 5 )
repeat with toolBtn = 0 to pToolCount - 1
set whichScript = the name of cast (firstToolObject + toolBtn)
setAt (pToolObjectList, (toolBtn + 1),mInit (script whichScript))
end repeat
set pToolRects = value(the text of cast "ToolRects")
set pToolMenus = value(the text of cast "ToolMenuCast")
-- Mac or PC QTVR object
-- if the machinetype = 256 then set pQTVRobj = mInit ( script"PCqtvr Parent",QTVRsprite, QTpath)
--else
set pQTVRobj = mInit ( script"MacQTVRParent",QTVRsprite, QTpath, me)
set pInvenFilenameLst = [#Edison:"Edison.Dir", #Watt:"Watt.Dir", #Bell:"Bell.Dir", #Gallery:"Gallery.Dir"]
set pInitialQTVRlst = ¼
[#Edison:"187.25,-2.1,54.5",#Watt:"10.3,-4.5,62",#Bell:"170.2,-5.9,47", #Gallery:"5.358, 0.201, 60.0"]
set pInvHsObjLst = ¼
[#Edison:gEHSobjIndexedLst, #Watt:gWHSobjIndexedLst, #Bell:gBHSobjIndexedLst, #Gallery:gGHSobjIndexedLst]
set pInventorIndexLst = [#Edison,#Watt,#Bell,#Gallery]
MoveBar( 5 )
set gQTVRobj = pQTVRobj
set pActiveTool = EMPTY
set the textHeight of field pLabelTxtCast = 12
set the textHeight of field pDescriptionTxtCast = 11
set the textHeight of field pInstructionTxtCast = 11
set gEdisonFilmed = FALSE
set gHelpFrame = empty
MoveBar( 5 )
set pToolsActive = TRUE
set pButtonSnd = the number of cast "GlobButn.aif"
set pGalleryVOsnd = #none
mAddToActorlist (gActorListMgrObj, me)
return( me )
end mInit
----------------------------------------------------------------------------ò
on mSetUp me -- to be used when in first frame of use
-- constants
--main interface button info
set pToolBtnGrpRect = the rect of sprite 32
set pGlobalBtnGrpRect = the rect of sprite 35
set pToolBtnWidth = 45
set toolBtnGapWidth = 9
set pGlobalBtnWidth = 48
set globalBtnGapWidth = 12
set pToolBtnSegWidth = pToolBtnWidth + toolBtnGapWidth
set pGlobalBtnSegWidth = pGlobalBtnWidth + globalBtnGapWidth
set pToolBtnGrpLeft = the left of pToolBtnGrpRect
set pGlobalBtnGrpLeft = the left of pGlobalBtnGrpRect
-- text fields
set pLabelLocH = the locH of sprite pLabelSprite
set pDescriptionLocH = the locH of sprite pDescriptionSprite
set pInstructionLocH = the locH of sprite pInstructionSprite
-- set object properties
-- tool buttons
set firstToolObject = getaProp(pCastList,#firstToolObject)
set firstToolMenu = getaProp(pCastList,#firstToolMenu)
set pToolMenuRects = value( the text of cast "ToolRects" )
set toolBtn = 0
MoveBar( 5 )
repeat with whichtool in pToolObjectList
set whichMenuCast = firstToolMenu + (toolBtn)
set toolBtn = toolBtn + 1
mSetup (whichtool)
end repeat
mClearText me
set pSuspendedTool = EMPTY
end
----------------------------------------------------------------------------ò
on mActivate me, toolsActive -- used to activate puppets and cursors
-- puppets
puppetsprite pRollOverHiliteSprite, TRUE
--puppetsprite pActiveHiliteSprite, TRUE
puppetsprite pToolWindowSprite, TRUE
puppetsprite pToolWinHiliteSprite, TRUE
puppetSprite pGlobalBtnOnSprite, TRUE
puppetsprite pToolHiliteSprite, TRUE
repeat with toolCounter = 0 to pToolCount - 1
puppetSprite (pRotateSprite + toolCounter), true
end repeat
--set the castNum of sprite pTitleSprite = pFirstTitle + findPos(pQTVRmovieList,pCurrentInventor) - 1
set pCurrentQTVR = getaProp( pQTVRmovieList, pCurrentInventor)
mSetToolBtns (me,#NONE, me)
if integerp( toolsActive ) then set pToolsActive = toolsActive
set pWhichBtnOver = #none
set pActive = TRUE
end
----------------------------------------------------------------------------ò
on mDeactivate me
mClearMyPuppets me
mSetToolBtns (me, #NONE, me)
mDeleteFromActorlist (pActorListMgr, me)
mHideQTVR( me )
end
----------------------------------------------------------------------------ò
on mClearMyPuppets me
-- set puppets to false
puppetsprite pRollOverHiliteSprite, FALSE
--puppetsprite pActiveHiliteSprite, FALSE
puppetsprite pToolWindowSprite, FALSE
puppetsprite pToolWinHiliteSprite, FALSE
puppetSprite pGlobalBtnOnSprite, FALSE
puppetSprite pTitleSprite, FALSE
repeat with toolCounter = 0 to pToolCount - 1
puppetSprite (pRotateSprite + toolCounter), FALSE
end repeat
end
----------------------------------------------------------------------------ò
on mGoToLab me
if (pWhichBtnOver = pFirstInventorBtn) then go frame "BVRFrame"
else if (pWhichBtnOver = pFirstInventorBtn + 1) then go frame "EVRFrame"
else if (pWhichBtnOver = pFirstInventorBtn + 2) then go frame "WVRFrame"
end
----------------------------------------------------------------------------ò
-- tool list management
----------------------------------------------------------------------------ò
on mSetToolBtns me, ActiveFunctionalty, ActiveFunctionObj -- controls which tool buttons are available
set pActiveFunctionalty = ActiveFunctionalty
if (pActiveFunctionalty <> #None) then
set pAvailableBtnList = [#rotate:0,#operate:0,#zoom:0,#reveal:0,#load:0]
set pAvailToolWinMenus = getaprop(pToolMenus,ActiveFunctionalty) --returns #QTVR:[#rotate...ect
set pAvailToolRects = getaprop(pToolRects,ActiveFunctionalty)
set numofAvailTools = count(pAvailToolWinMenus)
repeat with toolCounter = 1 to numofAvailTools
set tooltocheck = getpropat(pAvailToolWinMenus,toolCounter)
setprop(pAvailableBtnList, tooltocheck, 1)
set menuCast = the number of cast getaprop( pAvailToolWinMenus, tooltocheck)
set menuRects = getaprop( pAvailToolRects, tooltocheck)
set toolObj = getaprop (pToolObjectList, tooltocheck)
mSetMenuProp( toolObj, menuCast,menuRects,pToolWinHiliteSprite,ActiveFunctionalty)
end repeat
set gActiveFunctionObj = ActiveFunctionObj
else set pAvailableBtnList = [#rotate:0,#operate:0,#zoom:0,#reveal:0,#load:0]
updatestage
end mSetToolBtns
----------------------------------------------------------------------------ò
on mClearToolHilite me
set the member of sprite pToolWinHiliteSprite = pSpritePlaceMem
end
----------------------------------------------------------------------------ò
on mTurnToolMenuOff me
repeat with toolCounter = 1 to 6
set the castNum of sprite (pRotateSprite + (toolCounter - 1)) = pFirstToolOff + (toolCounter - 1)
end repeat
end mTurnToolMenuOff
----------------------------------------------------------------------------ò
on mClearToolMenu me
set the member of sprite pToolWinHiliteSprite = pSpritePlaceMem
set the member of sprite pToolWindowSprite = pSpritePlaceMem
updatestage
end mClearToolMenu
----------------------------------------------------------------------------ò
on mActivateTool me, whichBtn
mReinstateTool (me) -- reinstate previously active tool if any
mTurnOffTool (me)
set whatsnd = (the number of cast "Rotate.aif" + whichBtn -1 )
mPlaySndEffect (gUtilityObj, whatsnd)
set firstCast = the number of member (pFirstAnimTool + (whichBtn - 1) * pAnimBtnCount)
set pActive = false
repeat with animCounter = 0 to pAnimBtnCount - 1
set the member of sprite pRollOverHiliteSprite = member (firstCast + animCounter)
updatestage
mDelay (me, 5)
end repeat
set the castNum of sprite pRotateSprite + (whichBtn - 1) = pFirstToolOn + (whichBtn - 1)
updatestage
set pActiveTool = getAt (pToolObjectList, pWhichBtnOver)
set the castNum of sprite pToolWindowSprite = mGetToolMenuCast (pActiveTool)
updateStage
set pActive = true
end
----------------------------------------------------------------------------ò
on mSuspendTool me, whichTool -- holds active tool in suspension; prevents roll-over
set pSuspendedTool = whichTool
setAt (pAvailableBtnList, pSuspendedTool, 0)
end
----------------------------------------------------------------------------ò
on mReinstateTool me -- puts tool back in active list; allows roll-over
if (pSuspendedTool <> EMPTY) then setAt (pAvailableBtnList, pSuspendedTool, 1)
set pSuspendedTool = EMPTY
end
----------------------------------------------------------------------------ò
on mPerform me
if pActive then
-- get mouse location
set mouseLocV = the mouseV
set mouseLocH = the mouseH
set mousePoint = point(mouseLocH, mouseLocV)
-- check if over button rects; which one
if (inside(mousePoint, pToolBtnGrpRect)) and (pToolsActive) then mChkBtnHilites ¼
(me, mouseLocH, pToolBtnRelFirstCast, pToolBtnGrpLeft, pToolBtnSegWidth, pToolBtnWidth)
else if (inside(mousePoint, pGlobalBtnGrpRect)) then
mChkBtnHilites ¼
(me, mouseLocH, pGlobalBtnRelFirstCast, pGlobalBtnGrpLeft, pGlobalBtnSegWidth, pGlobalBtnWidth)
else
set the castNum of sprite pRollOverHiliteSprite = pSpritePlaceMem
if (pWhichBtnOver <> #none) and (pWhichBtnOver < 7 ) then set the castNum of sprite (pRotateSprite + (pWhichBtnOver - 1)) = pSpritePlaceMem
end if
end if
end
----------------------------------------------------------------------------ò
on mChkBtnHilites me, mouseLocH, startCastFactor, btnGrpLeft, segmentWidth, btnWidth
-- determine if over button
if ((mouseLocH - btnGrpLeft) mod segmentWidth < btnWidth ) then
set buttonSegment = startCastFactor + ((mouseLocH - btnGrpLeft) / segmentWidth)
if (buttonSegment = 6 ) then exit
if (buttonSegment >= 7 ) then
set the castnum of sprite pRollOverHiliteSprite = (pFirstHiliteBtn + buttonSegment) -1
else
if (pWhichBtnOver <> #none) then
set the castNum of sprite (pRotateSprite + (pWhichBtnOver - 1)) = pFirstAnimTool + ((pWhichBtnOver - 1) * 9)
end if
if getat(pAvailableBtnList, buttonSegment) = 0 then
set the castNum of sprite (pRotateSprite + (buttonSegment - 1)) = pFirstToolOff + (buttonSegment - 1)
else set the castNum of sprite (pRotateSprite + (buttonSegment - 1)) = pFirstAnimTool + ((buttonSegment - 1) * 9)
set the castnum of sprite pRollOverHiliteSprite = (pFirstHiliteBtn + buttonSegment) -1
end if
set pWhichBtnOver = buttonSegment -- save previous tool button over
else
if (pWhichBtnOver <> #none) and (pWhichBtnOver < 7 ) then
set the castNum of sprite (pRotateSprite + (pWhichBtnOver - 1)) = pFirstAnimTool + ((pWhichBtnOver - 1) * 9)
end if
set the member of sprite pRollOverHiliteSprite = pSpritePlaceMem
set pWhichBtnOver = #none
end if
end
----------------------------------------------------------------------------ò
on mClearBtnHilites me
set the member of sprite pRollOverHiliteSprite = pSpritePlaceMem
set the member of sprite pGlobalBtnOnSprite = pSpritePlaceMem
if (pWhichBtnOver <> #none) and (pWhichBtnOver < 7 ) then
set the castNum of sprite (pRotateSprite + (pWhichBtnOver - 1)) = pSpritePlaceMem
end if
updatestage
end mClearBtnHilites
----------------------------------------------------------------------------ò
on mInterfaceBtnHit me -- takes action based on currently highlighted button
if (pWhichBtnOver <> #none) then
mClearBtnHilites (me)
if (pWhichBtnOver < pGlobalBtnRelFirstCast) then
set availbutton = getat(pAvailableBtnList,pWhichBtnOver)
if availbutton then mActivateTool (me, pWhichBtnOver) -- tool btns
else if (pWhichBtnOver = pGlobalBtnRelFirstCast) then
mQuitBtnHit (me) -- quit button
else mDoGlobalBtnAction (me, pWhichBtnOver)
end if
end mInterfaceBtnHit
----------------------------------------------------------------------------ò
on mQuitBtnHit me
mClearMyPuppets me
mHideQTVR me
go "credits.dir"
end
----------------------------------------------------------------------------ò
on mGoInvestigation me
if objectp(gActiveInvObj) then
mclose( gActiveInvObj )
set gActiveInvObj = empty
end if
if (the moviename <> "INVEST.DIR") then
go "INVEST.DIR"
else
if objectp( gActiveInvObj ) then mclose ( gActiveInvObj )
set gActiveInvObj = empty
go "Investigations"
mActivate ( me )
end if
end mGoInvestigation
----------------------------------------------------------------------------ò
on mDoGlobalBtnAction me, whichBtn
mPlaySndEffect (gUtilityObj, pButtonSnd )
updatestage
if (pActiveTool <> EMPTY) then mTurnOffTool (me)
set the castNum of sprite pGlobalBtnOnSprite = pFirstGlobalBtnOn + (whichBtn - pGlobalBtnRelFirstCast )
updateStage
if (whichBtn = pGlobalBtnRelFirstCast + 8) then --Journal
if mAtBYS( gJournalObj) then mActivate(gJournalObj)
else mClearBtnHilites ( me )
else
if (whichBtn = pGlobalBtnRelFirstCast) then
mResetInterface me
go "credits.dir"
else if (whichBtn = pGlobalBtnRelFirstCast + 1) then
mResetInterface me
go "help.dir"
else if (whichBtn = pGlobalBtnRelFirstCast + 2) then
mResetInterface me
set gInventorIndexNum = 4
mChangeInventor (me, #GAllery)
else if (whichBtn = pGlobalBtnRelFirstCast + 3) and (the movie <> "Bell.dir") then
if ((gAvailbleInv = #Bell) or (gAvailbleInv = #All)) then
mResetInterface me
set gInventorIndexNum = 2
mChangeInventor (me, #Bell)
else
set the member of sprite pGlobalBtnOnSprite = member "HBELL.PIC"
updateStage
mVRHSaction (me, 102)
end if
else if (whichBtn = pGlobalBtnRelFirstCast + 4) and (the movie <> "Edison.dir") then
if ((gAvailbleInv = #Edison) or (gAvailbleInv = #All)) then
mResetInterface me
set gInventorIndexNum = 1
mChangeInventor (me, #Edison)
else
set the member of sprite pGlobalBtnOnSprite = member "HEDISON.PIC"
updateStage
mVRHSaction (me, 100)
end if
else if (whichBtn = pGlobalBtnRelFirstCast + 5) and (the movie <> "Watt.dir") then
if ((gAvailbleInv = #Watt) or (gAvailbleInv = #All)) then
mResetInterface me
set gInventorIndexNum = 3
mChangeInventor (me, #Watt)
else
set the member of sprite pGlobalBtnOnSprite = member "HWATT.PIC"
updateStage
mVRHSaction (me, 101)
end if
else if (whichBtn = pGlobalBtnRelFirstCast + 6) then
mResetInterface me
mGoInvestigation( me )
else if (whichBtn = pGlobalBtnRelFirstCast + 7) then
mResetInterface me
go "TIMELN.DIR"
end if
patchpal
end if
end mDoGlobalBtnAction
----------------------------------------------------------------------------------------------------------------ò
on mResetInterface me
mClearMyPuppets me
set pActive = FALSE
mHideQTVR me
sound stop 1
sound stop 2
set gActiveAmbSnd = 0
patchpal
if objectp( gActiveInvObj ) then mclose ( gActiveInvObj )
if objectp( gActiveFunctionObj ) then mclose( gActiveFunctionObj )
puppetsprite pPictSprite, False
mClearText (me)
end mResetInterface
----------------------------------------------------------------------------------------------------------------ò
on mSetInventor me, whichInventor
set pCurrentInventor = whichInventor
set pHSobjIndexedLst = getaprop( pInvHsObjLst, whichInventor)
mChangeInventor( gAreaManagerObj )
mReSetMode(gModeManager, #QTVR)
end mSetInventor
----------------------------------------------------------------------------------------------------------------ò
on mChangeInventor me, whichInventor
set InventorFilename = getaprop(pInvenFilenameLst,whichInventor)
set pCurrentInventor = whichInventor
set pHSobjIndexedLst = getaprop( pInvHsObjLst, whichInventor)
mChangeInventor( gAreaManagerObj )
mReSetMode(gModeManager, #QTVR)
mClose( pQTVRobj )
go InventorFilename
end mChangeInventor
----------------------------------------------------------------------------------------------------------------ò
on mActivateInventor me
if (gInventorIndexNum <> 4 ) then set pToolsActive = TRUE
cursor 4
set gActiveAmbSnd = getat( ["EAMBIENT.AIF","BAMBIENT.AIF","WAMBIENT.AIF","GALLERY.AIF"], gInventorIndexNum )
mPlayAmbient( gUtilityObj )
mUpdateReturnFrame (gUtilityObj)
set pHSobjIndexedLst = getaprop( pInvHsObjLst, pCurrentInventor)
set pCurrentQTVR = getaProp( pQTVRmovieList, pCurrentInventor )
set pInitialQTVRcords = getaprop( pInitialQTVRlst, pCurrentInventor)
mSetToolBtns (me, #QTVR)
mReSetMode(gModeManager, #QTVR)
mOpen (pQTVRobj, pCurrentQTVR, pInitialQTVRcords,2)
end mActivateInventor
----------------------------------------------------------------------------------------------------------------ò
on mToolMenuClicked me
mDenyClicks( gUtilityObj )
mPlaySndEffect (gUtilityObj, the number of cast "ToolButn.aif")
updatestage
mButtonClicked ( pActiveTool )
end mToolMenuClicked
----------------------------------------------------------------------------------------------------------------ò
on mTurnOffTool me
-- remove from active button list
set pActiveTool = EMPTY
-- reset sprites to normal interface
set the castNum of sprite pToolWinHiliteSprite = pSpritePlaceMem
set the castNum of sprite pToolWindowSprite = pSpritePlaceMem
--set the castNum of sprite pActiveHiliteSprite = pSpritePlaceMem
repeat with toolCounter = 0 to pToolCount - 1
if getAt(pAvailableBtnList, toolCounter + 1) = 1 then set the castNum of sprite (pRotateSprite + toolCounter) = pSpritePlaceMem
end repeat
end
----------------------------------------------------------------------------------------------------------------ò
on mDisplayText me, WhatHS
if not (listp(pHSobjIndexedLst)) or (WhatHS > 50) then exit
if (WhatHS <> pCurrentHStext) then
set pCurrentHStext = WhatHS
if (WhatHS = 0) then mClearText (me)
else
set the text of cast pLabelTxtCast = mGetLabel ( getprop(pHSobjIndexedLst,WhatHS))
set the text of cast pDescriptionTxtCast = mGetDescription ( getprop(pHSobjIndexedLst,WhatHS))
set the text of cast pInstructionTxtCast = " "
end if
end if
end mDisplayText
----------------------------------------------------------------------------------------------------------------ò
on mDisplayClickText me, WhatHS
if gInventorIndexNum = 4 then
if gAvailbleInv <> #ALL then
set argTopSpriteNum = 25
puppetsprite argTopSpriteNum, true
case gAvailbleInv of
#Bell: set the member of sprite argTopSpriteNum = member "BELL GALLERY BUY.PIC"
#Watt: set the member of sprite argTopSpriteNum = member "WATT GALLERY BUY.PIC"
#Edison: set the member of sprite argTopSpriteNum = member "EDISON GALLERY BUY.PIC"
end case
end if
else
set the text of cast pDescriptionTxtCast = " "
set the text of cast pLabelTxtCast = mGetLabel ( getprop(pHSobjIndexedLst,WhatHS))
set the text of cast pInstructionTxtCast = mGetInstruction ( getprop(pHSobjIndexedLst,WhatHS))
end if
end mDisplayClickText
----------------------------------------------------------------------------------------------------------------ò
on mClearText me
-- clear text
set the text of cast pLabelTxtCast = " "
set the text of cast pDescriptionTxtCast = " "
set the text of cast pInstructionTxtCast = " "
end mClearText
----------------------------------------------------------------------------------------------------------------ò
on mDelay me, numOfTicks
set endTime = the ticks + numOfTicks
repeat while (the ticks < endTime)
end repeat
end mDelay
----------------------------------------------------------------------------------------------------------------ò
on mShowQTVR me
cursor 4
mDenyClicks( gUtilityObj )
mUpdateReturnFrame(gUtilityObj)
mShow( pQTVRobj )
set gActiveAmbSnd = getat(["EAMBIENT.AIF","BAMBIENT.AIF","WAMBIENT.AIF","GALLERY.AIF"],gInventorIndexNum)
mPlayAmbient( gUtilityObj )
mSetToolBtns me, (#QTVR)
end mShowQTVR
----------------------------------------------------------------------------------------------------------------ò
on mHideQTVR me
mDenyClicks( gUtilityObj )
mClearToolMenu ( me )
mSetToolBtns (me, #NONE)
mHide( pQTVRobj )
end mHideQTVR
----------------------------------------------------------------------------------------------------------------ò
on mVRHSaction me, sHS
mDistributeHS( gAreaManagerObj, sHS )
end mVRHSaction
----------------------------------------------------------------------------------------------------------------ò